package com.ostrich.cloud.ostrichUserWeb.client;

import com.ostrich.cloud.common.result.Result;
import com.ostrich.cloud.ostrichUserWeb.client.goodsParam.GetGoodsBuTypeId;
import com.ostrich.cloud.ostrichUserWeb.client.goodsParam.GetGoodsByBusinessman;
import com.ostrich.cloud.ostrichUserWeb.client.goodsParam.GetGoodsLikeGoodsName;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;

@FeignClient(contextId = "customerGoodsManagerClient",name="ostrichUserWeb")
@Api("商品查询相关接口")
public interface CustomerGoodsManagerClient {
    @PostMapping("getAllGoods")
    @ApiOperation("查询门店下所有商品")
    public Result getAllGoods(@RequestBody @Valid GetGoodsByBusinessman param);

    @PostMapping("getGoodsByType")
    @ApiOperation("分类查询门店下所有商品")
    public Result getGoodsByType(@RequestBody @Valid GetGoodsBuTypeId getGoodsBuTypeId);

    @PostMapping("getGoodsLikeName")
    @ApiOperation("商品名模糊查询商品")
    public Result getGoodsLikeName(@RequestBody @Valid GetGoodsLikeGoodsName param);

    @GetMapping("gerGoods")
    @ApiOperation("查询商品详情")
    public Result getGoods(@RequestParam("goodsId")Integer goodsId);

}
